package com.hhkj.study.admin.dict.model.req;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONUtil;
import com.hhkj.study.admin.dict.model.podo.DictMultiLevelDo;
import lombok.Data;

import lombok.EqualsAndHashCode;

/**
*
* @author SERVER
* @since 2024-09-06
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class DictMultiLevelReq extends DictMultiLevelDo {

    @Override
    public String getExtendTypes() {
        if (CollectionUtil.isNotEmpty(this.getExtendTypeList())) {
            return JSONUtil.toJsonStr(getExtendTypeList());
        }
        return super.getExtendTypes();
    }

    @Override
    public String getExtendIds() {
        if (CollectionUtil.isNotEmpty(this.getExtendIdList())) {
            return JSONUtil.toJsonStr(getExtendIdList());
        }
        return super.getExtendIds();
    }
}